function common_share(options){
    var defaultFeatures={
        scrollbars:"no",
        status:"yes",   
        resizable:"no",
        titlebar:"no", 
        width:screen.availWidth-400,
        height:screen.availHeight-200,
        top:Math.ceil(100),
        left:Math.ceil(200)
    }
    this.options = $.extend({
        share_url:"http://www.aceona.com/", 
        share_title:"红桃网", 
        share_summary:"",
        myArtId:"0",
        id:"",
        features:{},
        share_save:false,
        share_id:"",
        shareType:[{id:"tqq",
            url:"http://v.t.qq.com/share/share.php?title=?share_title&url=?share_url&site=www.aceona.com&appkey="+encodeURI('7c3450bbecd247758089ee8df5cf546c'),
                    tip:"转播到腾讯微博",
                    styleClass:"em_a"
                   },
                   {id:"tsina",
                       url:"http://v.t.sina.com.cn/share/share.php?title=?share_title&url=?share_url&appkey=" + 2937052444+ "&ralateUid=1900277444&content=utf-8",
                       tip:"转播到新浪微博",
                       styleClass:"em_c"
                      }
        ]
  },options || {});
  this.options.features = $.extend(defaultFeatures,this.options.features);
}
common_share.prototype={
    snsShare:function(_id)
    {
        var shareTypes=this.options.shareType;
        for (var i = 0, len = shareTypes.length; i < len; i++) 
        {
    		var _type = shareTypes[i];
            var id = _type.id+this.options.id;
            if(_id==id)
            {
                var features = [];
                for (var name in this.options.features) {
                    features.push(name + '=' + this.options.features[name]);
                }
                var extend_share_title=this.options.share_title;
                
                
                	extend_share_title = extend_share_title + "    " + this.options.share_summary;
                
                
                if(extend_share_title.length>110)
                {
                	extend_share_title = extend_share_title.substring(0,108)+"...";
                }
                
                if(_type.id != "tsina"){
                	extend_share_title = extend_share_title+"（分享自 @aceona88）";
                }
                
                this.options.share_url = this.options.share_url.replace("?share_type", _type.id);
                var url =_type.url.replace("?share_url",encodeURIComponent(this.options.share_url)).replace("?share_title",encodeURIComponent(extend_share_title));
                
                window.open(url,_type.tip,features.join(','));
                
                //记录分享数
                $.getJSON("/updateCount/2/"+this.options.myArtId+"/");
                break;
            }
        }
    }
}
